home *** CD-ROM | disk | FTP | other *** search
- on Dialog___________________________
- end
-
- on InitWindows
- global gCentroMonitorH, gCentroMonitorV, gDirDialog, gOpenedIndexWindow, gRectIndex, gAltezzaMin, gAltezzaMax, gRectReport, gMyReportWindow, gRectWindDate, gRectWindTimerHour
- set the windowList to []
- set gMyReportWindow to gDirDialog & "SR"
- set wLunghezza to 480
- set gAltezzaMax2 to 330
- set L to gCentroMonitorH - (wLunghezza / 2)
- set T to gCentroMonitorV - (gAltezzaMax2 / 2) - 60
- set r to gCentroMonitorH + (wLunghezza / 2)
- set b to gCentroMonitorV + (gAltezzaMax2 / 2) - 60
- set gRectReport to rect(L, T, r, b)
- set wLunghezza to 220
- set wAltezza to 80
- set L to gCentroMonitorH - (wLunghezza / 2)
- set T to gCentroMonitorV - (wAltezza / 2) - 60
- set r to gCentroMonitorH + (wLunghezza / 2)
- set b to gCentroMonitorV + (wAltezza / 2) - 60
- set gRectWindDate to rect(L, T, r, b)
- set wLunghezza to 220
- set wAltezza to 60
- set L to gCentroMonitorH - (wLunghezza / 2)
- set T to gCentroMonitorV - (wAltezza / 2) - 60
- set r to gCentroMonitorH + (wLunghezza / 2)
- set b to gCentroMonitorV + (wAltezza / 2) - 60
- set gRectWindTimerHour to rect(L, T, r, b)
- end
-
- on AlertBox message, ProssProc
- global gSep, gDirDialog, gCentroMonitorH, gCentroMonitorV, gNextProcedura1
- set mywindow to gDirDialog & "Dialog"
- if not voidp(ProssProc) then
- set gNextProcedura1 to ProssProc
- else
- set gNextProcedura1 to "nothing"
- end if
- set the modal of window mywindow to 1
- set wLunghezza to 340
- set wAltezza to 125
- set L to gCentroMonitorH - (wLunghezza / 2)
- set T to gCentroMonitorV - (wAltezza / 2) - 60
- set r to gCentroMonitorH + (wLunghezza / 2)
- set b to gCentroMonitorV + (wAltezza / 2) - 60
- set the rect of window mywindow to rect(L, T, r, b)
- set the windowType of window mywindow to 1
- tell window mywindow
- set the text of member "Messaggio" to message
- set the text of member "P1" to "OK"
- go("alert")
- end tell
- open(window mywindow)
- moveToFront(window mywindow)
- end
-
- on DialogBoxSiNo message, ProssimaProcedura1, ProssimaProcedura2, Primo, Secondo
- global gNextProcedura1, gNextProcedura2, gSep, gDirDialog, gCentroMonitorH, gCentroMonitorV
- updateStage()
- set gNextProcedura1 to ProssimaProcedura1
- set gNextProcedura2 to ProssimaProcedura2
- set mywindow to gDirDialog & "Dialog"
- set the modal of window mywindow to 1
- set wLunghezza to 340
- set wAltezza to 125
- set L to gCentroMonitorH - (wLunghezza / 2)
- set T to gCentroMonitorV - (wAltezza / 2) - 60
- set r to gCentroMonitorH + (wLunghezza / 2)
- set b to gCentroMonitorV + (wAltezza / 2) - 60
- set the rect of window mywindow to rect(L, T, r, b)
- set the windowType of window mywindow to 1
- if (stringp(Primo) = 0) or (Primo = EMPTY) then
- set Primo to "Yes"
- end if
- if (stringp(Secondo) = 0) or (Secondo = EMPTY) then
- set Secondo to "No"
- end if
- tell window mywindow
- set the text of member "Messaggio" to message
- set the text of member "P1" to Primo
- set the text of member "P2" to Secondo
- go("SiNo")
- end tell
- open(window mywindow)
- end
-
- on ShowReportWindow
- global gMyReportWindow, gDirDialog, gMultiAll, gShortTextLog, gShortReportList, gCurrLog, gTotLog, gLogPathList, gShortFlag, gAltezzaWind, gRectReport, gBaseWind, gMaxLines
- if not windowPresent(gMyReportWindow) then
- set the rect of window gMyReportWindow to gRectReport
- set the modal of window gMyReportWindow to 1
- set the windowType of window gMyReportWindow to 8
- end if
- SetMenuWindows()
- set gCurrLog to 1
- set gTotLog to count(gShortReportList)
- if gTotLog = 0 then
- append(gShortReportList, gShortTextLog)
- end if
- set gTotLog to count(gShortReportList)
- if count(gLogPathList) = 0 then
- set gShortFlag to 1
- end if
- tell window gMyReportWindow
- set gAltezzaWind to the bottom of gRectReport - the top of gRectReport
- set gBaseWind to the right of gRectReport - the left of gRectReport
- set the rect of member "fReport" to rect(0, 0, gBaseWind - 22, gAltezzaWind - 5 - 15)
- set gMaxLines to the pageHeight of member "fReport" / the textHeight of member "fReport"
- ReadLogText()
- go("Report")
- end tell
- open(window gMyReportWindow)
- end
-
- on ChiudiFreccia
- set the member of sprite 18 to member "BtnUpFreccia0"
- updateStage()
- end
-
- on CloseReportWindow
- global gMyReportWindow, gOpenedIndexWindow
- close(window gMyReportWindow)
- end
-
- on CloseAllWindow
- global gMyReportWindow, gOpenedIndexWindow, gDirDialog
- if windowPresent(gMyReportWindow) then
- set gOpenedIndexWindow to 0
- set the member of sprite 18 to member "BtnUpFreccia0"
- updateStage()
- close(window gMyReportWindow)
- end if
- if windowPresent(gDirDialog & "Dialog") then
- close(window (gDirDialog & "Dialog"))
- end if
- end
-
- on OpenDateWind myLinea
- global gNextProcedura1, gNextProcedura2, gSep, gDirDialog, gRectWindDate, gLastBackUpDate
- SetMenuWindows()
- set gNextProcedura1 to "ImportFilterDate " & myLinea
- set gNextProcedura2 to "nothing"
- set mywindow to gDirDialog & "Dialog"
- set the modal of window mywindow to 1
- set the rect of window mywindow to gRectWindDate
- set the title of window mywindow to "Set Date"
- set the windowType of window mywindow to 4
- if line myLinea of field "fDateList" = " " then
- set oggiGiorno to TodayDay(1)
- set oggiMese to TodayMonth(1)
- set oggiAnno to TodayYear(1)
- else
- set mialinea to line myLinea of field "fDateList"
- set oggiGiorno to Sinistra(mialinea, 2)
- set oggiMese to MeseNum(Centro(mialinea, 4, 6))
- set oggiAnno to Destra(mialinea, 4)
- end if
- tell window mywindow
- set the text of member "P1" to "Set"
- put oggiAnno into field "fAnno"
- put oggiMese into field "fMese"
- put oggiGiorno into field "fGiorno"
- set LastBackUpDateStr to "Set Last Backup Date:" && getAt(gLastBackUpDate, 3) && getAt(gLastBackUpDate, 2) && getAt(gLastBackUpDate, 1)
- put LastBackUpDateStr into field "fLastBackupDate"
- go("PrefDate")
- end tell
- open(window mywindow)
- end
-
- on OpenHourWind myLinea
- global gNextProcedura1, gNextProcedura2, gSep, gDirDialog, gRectWindTimerHour
- SetMenuWindows()
- set gNextProcedura1 to "ImportTimerHour " & myLinea
- set gNextProcedura2 to "nothing"
- set mywindow to gDirDialog & "Dialog"
- set the modal of window mywindow to 1
- set the rect of window mywindow to gRectWindTimerHour
- set the title of window mywindow to "Set Hour"
- set the windowType of window mywindow to 4
- if line myLinea of field "fHourList" = " " then
- set oggiHour to NowHour(1)
- set oggiMinute to NowMinute(1)
- else
- set mialinea to line myLinea of field "fHourList"
- set oggiHour to Sinistra(mialinea, 2)
- set oggiMinute to Centro(mialinea, 4, 5)
- end if
- tell window mywindow
- set the text of member "P1" to "Set"
- put oggiHour into field "fHour"
- put oggiMinute into field "fMinute"
- go("TimerHour")
- end tell
- open(window mywindow)
- end
-
- on chiudiWindow
- close(the frontWindow)
- updateStage()
- end
-